package server.connector;

import java.net.*;
import server.dbconnector.DatabaseConnector;
public class ServerConnector {
	private ServerSocket ss;
	private DatabaseConnector dc;
    public ServerConnector(DatabaseConnector dc)throws Exception{
    	this.dc=dc;
    	ss=new ServerSocket(23456);
    }
    public void start()throws Exception{
    	while(true){
    		Socket soc=ss.accept();
    		ServerConnectorThread sec=new ServerConnectorThread(soc,dc);
    		Thread t=new Thread(sec);
    		t.start();
    	}
    }
}
